package dubbo.server4.impl.controller;

import dubbo.server4.impl.rabbitmq.MsgProducer;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/rabbitmq")
public class RabbitMqController extends BaseController{
    private Logger logger = Logger.getLogger(HelloWordController.class);
    @Autowired
    private MsgProducer msgProducer;
    @RequestMapping("/send")
    public void send() {
        msgProducer.sendMsg("我是exchange_A QUEUE_A消息！");
        logger.info("消息已经发送!");
    }
}
